﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
using Truron.Purchase.Model.RemoteModel;
using Truron.Purchase.Utility;

namespace Truron.Purchase.Model
{
    [Serializable]
    [PrimaryKey("Id")]
    [Table("Purchase_Supply")]
    public class Purchase_Supply:BaseData
    {
        public string MarketArea { get; set; }
        public string Province { get; set; }
        public string City { get; set; }
        public string SupplyNo { get; set; }
        public string Supplier { get; set; }
        public string Abbr { get; set; }
        public string Address { get; set; }
        public string ContactPerson { get; set; }
        public string ContactMail { get; set; }
        public string ContactTel { get; set; }
        public string ContactCellphone { get; set; }

        public string IsCritical { get; set; }
        public string Manufacturer { get; set; }
        public string ManufacturerAddress { get; set; }
        public string ManufacturerContactPerson { get; set; }

        public string ManufacturerMail { get; set; }
        public string ManufacturerTel { get; set; }
        public string ManufacturerCellphone { get; set; }
        public string Category { get; set; }
        public string Supplies { get; set; }
        public string Notes { get; set; }
        public DateTime InDate { get; set; }
        public void Create(UserCache userInfo)
        {
            this.CreateUser = userInfo.UserId;
            this.CreateTime = DateTime.Now;
        }
        public void Modify(UserCache userInfo)
        {
            this.LastUpdateUser = userInfo.UserId;
            this.LastUpdateTime = DateTime.Now;
        }
    }
}
